<template>
  <div class="stock-detail">
    <Title title="出库详情" />
    <div v-if="deliveryData.outboundDetail && deliveryData.outboundDetail.length">
      <StockoutItem
        v-for="(item, index) in deliveryData.outboundDetail"
        :key="index"
        :stock-item="item"
        @getOutboundDetail="getOutboundDetail"
      />
    </div>
    <el-empty v-else description="暂无出库信息" />
  </div>
</template>

<script>
import Title from '@/components/Title'
import StockoutItem from './StockoutItem'
export default {
  name: 'StockDetail',
  components: {
    StockoutItem,
    Title
  },
  props: {
    deliveryData: {
      type: Object,
      default: () => {}
    }
  },
  methods: {
    getOutboundDetail() {
      this.$emit('getOutboundDetail')
    }
  }
}
</script>

<style lang="scss" scoped>
.stock-detail {
  font-size: 14px;
}
</style>
